CSharpTest.Net
Initialize Method
See Also  Example Send Feedback Download Help File
CSharpTest.Net.Library Assembly > CSharpTest.Net.Collections Namespace > LurchTable<TKey,TValue> Class : Initialize Method

Glossary Item Box

WARNING: not thread-safe, reinitializes all internal structures. Use Clear() for a thread-safe delete all. If you have externally provided exclusive access this method may be used to more efficiently clear the collection.

Syntax

Visual Basic (Declaration) 
Public Sub Initialize() 
C# 
public void Initialize()

Exceptions

ExceptionDescription
LurchTableCorruptionExceptionException class: LurchTableCorruptionException The LurchTable internal datastructure appears to be corrupted.

Example

Library/Library.Test/TestLurchTable.cs

C#Copy Code
LurchTableTest<string, string> test = new LurchTableTest<string, string>(StringComparer.Ordinal);
test["a"] = "b";
Assert.AreEqual(1, test.Count);
test.Initialize();
Assert.AreEqual(0, test.Count);
VB.NETCopy Code
Dim test As New LurchTableTest(Of String, String)(StringComparer.Ordinal)
test("a") = "b"
Assert.AreEqual(1, test.Count)
test.Initialize()
Assert.AreEqual(0, test.Count)

Requirements

Target Platforms: Windows XP, Windows Server 2003, Windows Vista, Windows Server 2008, Windows 7

See Also

Generated with Document! X 2011 by Innovasys